package com.whsxt.feign;

import com.whsxt.domain.Order;
import com.whsxt.feign.hystrix.PayOrderFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * @Author: caoqingwen
 * @CreateTime: 2021-03-30 11:36
 * @Description:
 */
@FeignClient(value = "order-service", fallback = PayOrderFeignHystrix.class)
public interface PayOrderFeign {


    /**
     * 查询订单信息
     *
     * @param orderNum
     * @return
     */
    @PostMapping("/getOrderByOrderNum")
    Order getOrderByOrderNum(@RequestParam String orderNum);

    /**
     * 修改订单状态
     *
     * @param orderNum
     * @return
     */
    @PostMapping("/changeStatusOrderNum")
    void changeStatusByOrderNum(@RequestParam String orderNum);
}
